<?php
/**
 * Created by JetBrains PhpStorm.
 * User: pete
 * Date: 10/24/13
 * Time: 1:24 PM
 * To change this template use File | Settings | File Templates.
 */
class Profile extends CI_Model
{
    public function __construct()
    {
        parent::__construct();

        $this->load->database();
    }

    public function get_graphData()
    {
        $sql = "SELECT Description, COUNT(*) as 'count'
        FROM exp_fmis_member_profile, exp_fmis_degree
        WHERE ID = Degree GROUP BY Degree";

        $data = $this->db->query($sql);

        return $data->result_array();
    }

    public function get_facultyNames()
    {
        $sql = "SELECT CONCAT (`LastName`,', ',`FirstName`) as faculty
        FROM `exp_fmis_member_profile`
        Order by LastName asc";

        $data = $this->db->query($sql);

        return $data->result_array();
    }


}
